package com.rong.ORM;

import java.util.Date;

import com.rong.DAO.ZynCarDAO;
import com.rong.DAO.ZynCompanyDAO;

/**
 * ZynPrice1 entity. @author MyEclipse Persistence Tools
 */

public class ZynPrice1 implements java.io.Serializable {

	ZynCompanyDAO comDao=new ZynCompanyDAO();
	ZynCarDAO carDao=new ZynCarDAO();
	// Fields

	private Integer id;
	private Integer comId;
	private String comName;
	private Integer carId;
	private String carName;
	private Double price;
	private String piece;
	private Date invalidationDate;
	private String remark;
	private String extattr1;
	private String extattr2;
	private String extattr3;
	private String extattr4;
	private String extattr5;
	
	private ZynCar  carObj;
	private ZynCompany comObj;
	

	// Constructors

	/** default constructor */
	public ZynPrice1() {
	}

	/** full constructor */
	public ZynPrice1(Integer comId,String comName, Integer carId,String carName, Double price, String piece,
			Date invalidationDate, String remark, String extattr1,
			String extattr2, String extattr3, String extattr4, String extattr5,ZynCar  carObj,ZynCompany comObj) {
		this.comId = comId;
		this.carId = carId;
		this.carName = carName;
		this.comName= comName;
		this.price = price;
		this.piece = piece;
		this.invalidationDate = invalidationDate;
		this.remark = remark;
		this.extattr1 = extattr1;
		this.extattr2 = extattr2;
		this.extattr3 = extattr3;
		this.extattr4 = extattr4;
		this.extattr5 = extattr5;
		this.carObj  = carObj;
		this.comObj = comObj;

	}

	// Property accessors

	
	public Integer getId() {
		return this.id;
	}

	/**
	 * @return the comName
	 */
	public String getComName() {
		return comName;
	}

	/**
	 * @param comName the comName to set
	 */
	public void setComName(String comName) {
		this.comName = comName;
	}

	/**
	 * @return the carName
	 */
	public String getCarName() {
		return carName;
	}

	/**
	 * @param carName the carName to set
	 */
	public void setCarName(String carName) {
		this.carName = carName;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getComId() {
		return this.comId;
	}

	public void setComId(Integer comId) {
		this.comId = comId;
		this.setComName(comDao.findById(this.comId).getComName());
	}

	public Integer getCarId() {
		return this.carId;
	}

	public void setCarId(Integer carId) {
		this.carId = carId;
		this.setCarName(carDao.findById(this.carId).getNum());
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getPiece() {
		return this.piece;
	}

	public void setPiece(String piece) {
		this.piece = piece;
	}

	public Date getInvalidationDate() {
		return this.invalidationDate;
	}

	public void setInvalidationDate(Date invalidationDate) {
		this.invalidationDate = invalidationDate;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getExtattr1() {
		return this.extattr1;
	}

	public void setExtattr1(String extattr1) {
		this.extattr1 = extattr1;
	}

	public String getExtattr2() {
		return this.extattr2;
	}

	public void setExtattr2(String extattr2) {
		this.extattr2 = extattr2;
	}

	public String getExtattr3() {
		return this.extattr3;
	}

	public void setExtattr3(String extattr3) {
		this.extattr3 = extattr3;
	}

	public String getExtattr4() {
		return this.extattr4;
	}

	public void setExtattr4(String extattr4) {
		this.extattr4 = extattr4;
	}

	public String getExtattr5() {
		return this.extattr5;
	}

	public void setExtattr5(String extattr5) {
		this.extattr5 = extattr5;
	}

	/**
	 * @return the carObj
	 */
	public ZynCar getCarObj() {
		return carObj;
	}

	/**
	 * @param carObj the carObj to set
	 */
	public void setCarObj(ZynCar carObj) {
		this.carObj = carObj;
	}

	/**
	 * @return the comObj
	 */
	public ZynCompany getComObj() {
		return comObj;
	}

	/**
	 * @param comObj the comObj to set
	 */
	public void setComObj(ZynCompany comObj) {
		this.comObj = comObj;
	}


}